package com.topone.dataObject;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.topone.Enum.ShopApplyStatusEnum;
import com.topone.Utils.EnumUnitl;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;

/**
 * Created by Administrator on 2017/12/17,0017.
 */
@Data
@Entity
@DynamicUpdate
public class ShopApply {

    @Id
    private  String shopId;  //商家id

    private  String shopName; //商家名称

    private  String contactName;  //联系人

    private  String contactPhone;  //联系电话

    private  String shopAddress;   //联系地址

    private Integer applyStatus= ShopApplyStatusEnum.WAIT.getCode();  //申请状态

    private Date  createTime;

    private Date updateTime;

    @JsonIgnore
    public ShopApplyStatusEnum getShopApplyStatusEnum(){
        return EnumUnitl.getByCode(applyStatus,ShopApplyStatusEnum.class);
    }
}
